import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import scan.ISchool;
import scan.Klass;
import scan.School;
import scan.Student;

public class XMLBeanMain {
    public static void main(String args[])
    {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("ApplcationContext.xml");
        Student student = (Student) applicationContext.getBean("student100");
        System.out.println(student);
        student.print();
        System.out.println("--------");
        Klass klass = (Klass) applicationContext.getBean("class1");
        klass.dong();
        System.out.println("--------");
        School school = applicationContext.getBean(School.class);
        school.ding();
    }
}
